import pandas as pd
import csv

with open("wh.csv", encoding='utf-8')as file:
    data = pd.read_csv(file)
    names = list(data.name)
    urls = list(data.url)
    toNames = list()
    toUrls = list()
    print(len(urls))
    for i in range(0, len(urls)):
        if urls[i] not in toUrls:
            toNames.append(names[i])
            toUrls.append(urls[i])
    print(len(toNames),len(toUrls))
    for i in range(0, len(toNames)):
        with open("whs.csv", 'a+', newline='', encoding='utf-8') as f:
            csv_write = csv.writer(f)
            data_row = [toNames[i], toUrls[i]]
            csv_write.writerow(data_row)